#ifndef QJSCANWORDDOCUMENT_H
#define QJSCANWORDDOCUMENT_H

#include <QObject>
#include <QSize>
#include <QVector>
#include <QtGui>
#include <memory.h>

typedef QVector<uchar> MVLine;//matrix value line;

class QJScanwordView;
class QJScanwordDocument : public QObject
{
    Q_OBJECT
public:
    explicit QJScanwordDocument(const QVector<MVLine> , const QVector<MVLine> , const QSize, QObject *parent = 0);
    ~QJScanwordDocument();
    friend class QJScanwordView;
signals:
    
public slots:
private:
    uchar *m_Matrix;
    QVector<MVLine> m_rowValues;
    QVector<MVLine> m_colValues;

    const QSize m_szMatrix;

    bool m_hasSolution;
    bool m_foundedSolution;
    uchar *m_Matrix_solution;

    uint maxVValueLine;
    uint maxHValueLine;
    uint maxMVlineSize(const QVector<MVLine>&);
};

#endif // QJSCANWORDDOCUMENT_H
